package com.examonline.controller;

import com.examonline.pojo.dto.PaperDTO;
import com.examonline.pojo.vo.PaperVO;
import com.examonline.service.PaperService;
import com.examonline.utils.result.Result;
import com.examonline.utils.result.ResultEnum;
import com.examonline.utils.result.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/paper")
@CrossOrigin("*")
public class PaperController {

    @Autowired
    private PaperService paperService;

    @GetMapping("/query")
    public Result query(@RequestBody PaperDTO paperDTO){
        return paperService.queryList(paperDTO);
    }

    @PutMapping
    public Result update(){
        return ResultUtil.error(ResultEnum.UN_DEVELOP);
    }

    @DeleteMapping
    public Result delete(){
        return ResultUtil.error(ResultEnum.UN_DEVELOP);
    }

    @PostMapping
    public Result save(){
        return ResultUtil.error(ResultEnum.UN_DEVELOP);
    }


}
